<?php

namespace app\index\controller;

use think\Controller;
use think\Db;
class Base extends Controller
{
    //自动加载
    public function __construct(){
    	parent::__construct();
    	session('lecturer_user_no','2018112015051635');
        if(!session('?lecturer_user_no')){
            $this->redirect('index/login/index');
        }
    }
    public function getSubject(){
    	$data=Db::table('sys_subject')->where(['status_id'=>1])->field('subject_name,id')->order(['id','sort'=>'desc'])->select();
    	return $data;
    }
}
